package com.dragon.shop.order.fegin.fallback;

import com.dragon.shop.bean.Product;
import com.dragon.shop.order.fegin.ProductService;
import com.dragon.shop.utils.resp.ResponseEntity;
import org.springframework.stereotype.Component;

/**
 * @author: Dragon
 * @since: 2023/12/1 20:55
 */
@Component
public class ProductServiceFallBack implements ProductService {
    @Override
    public Product getProduct(Long pid) {
        Product product = new Product();
        product.setId(-1L);
        return product;
    }

    @Override
    public ResponseEntity updateCount(Long pid, Integer count) {
        ResponseEntity response = new ResponseEntity();
        response.setCode(1001);
        response.setMsg("触发了容错逻辑");
        return response;
    }
}
